home *** CD-ROM | disk | FTP | other *** search
- Path: news.dal.ca!news
- From: Klaus.Eichele@Dal.Ca (Klaus Eichele)
- Newsgroups: comp.lang.c++
- Subject: Re: I've discovered sound!
- Date: Tue, 02 Apr 1996 05:21:32 GMT
- Organization: Dalhousie University
- Message-ID: <4jpvkm$gcv@News.Dal.Ca>
- References: <4jph80$aj2@news1.warwick.net>
- NNTP-Posting-Host: rewasylishen.chem.dal.ca
- X-Newsreader: Forte Free Agent 1.0.82
-
- vidman@warwick.net (i've discovered sound!) wrote:
-
- >I've just discovered the sound() function in dos.h Unfortunately it
- >only uses frequency's. Can anyone tell me which frequency's go with
- >which notes, and how to convert from octave to octave?
-
- Hi,
- here are a few octaves I calculated myself. I used "well-tempered"
- ratios, starting for the standard note for tuning, 'a1', with a
- frequency of 440 Hz (nowadays, however, a slightly higher frequency is
- generally used). A higher octave has double the frequency, a lower
- octave half the frequency, etc. A half-tone higher is generated by
- multiplying by the twelfth root of 2. The suffix 'is' corresponds to
- the 'sharp'. (I used German names, but you certainly can change that).
-
-
- /* ------------------------------------------------------------------
- small octave
- ------------------------------------------------------------------*/
- #define c 130.818
- #define cis 138.591
- #define d 146.832
- #define dis 155.563
- #define e 164.814
- #define f 174.614
- #define fis 184.997
- #define g 195.998
- #define gis 207.652
- #define a 220.000
- #define ais 233.082
- #define h 246.942
-
- /* ------------------------------------------------------------------
- single primed octave
- ------------------------------------------------------------------*/
- #define c1 261.623
- #define cis1 277.183
- #define d1 293.665
- #define dis1 311.127
- #define e1 329.628
- #define f1 349.228
- #define fis1 369.994
- #define g1 391.995
- #define gis1 415.305
- #define a1 440.000
- #define ais1 466.164
- #define h1 493.883
-
- /* ------------------------------------------------------------------
- double primed octave
- ------------------------------------------------------------------*/
- #define c2 523.251
- #define cis2 554.365
- #define d2 587.330
- #define dis2 622.254
- #define e2 659.255
- #define f2 698.456
- #define fis2 739.990
- #define g2 783.991
- #define gis2 830.609
- #define a2 880.000
- #define ais2 932.328
- #define h2 987.767
-
- Good Luck,
- Klaus
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Klaus Eichele keichele@is.dal.ca
- http://is.dal.ca/~keichele/keichele.html
-
-